///Vue.prototype.$http = {getSongs(){},getStory(){}}

import Vue from 'vue';

let files = require.context('./',false,/\.js$/);

console.log(files.keys())

let $api = files.keys().filter(item => !item.includes('index')).reduce((prev,path) => {
    // console.log(files(path).default);
    return {
        ...prev,
        ...files(path).default
    }
},{})

// console.log($api)
Vue.prototype.$http = $api;